package cn.itcast.hotel.controller;

import cn.itcast.hotel.pojo.HotelDoc;
import cn.itcast.hotel.pojo.PageHotel;
import cn.itcast.hotel.pojo.RequestParameter;
import cn.itcast.hotel.service.IHotelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author げっしょく
 * @date 2021/11/11
 */
@RestController
@RequestMapping("/hotel")
public class HotelController {

    @Autowired
    private IHotelService hotelService;

    @PostMapping("/list")
    public PageHotel getHotel(@RequestBody RequestParameter parameter) {

        return hotelService.getFiltersHotel(parameter);
    }

//    @PostMapping("/filters")
    public PageHotel getfiltersHotel(@RequestBody RequestParameter parameter) {

        return hotelService.getFiltersHotel(parameter);
    }
}
